<html>
<head>
	<title></title>
	<link rel="stylesheet" type="text/css" href="style.css"/>
</head>
<body>
<div class="demo">
<?php

$studentnumber = $_POST["studentnumber"];
$firstname = $_POST["firstname"];
$middlename = $_POST["middlename"];
$lastname = $_POST["lastname"];
$birthday = $_POST["birthday"];
$classification = $_POST["classification"];
$course = $_POST["course"];
$college = $_POST["college"];

$con = mysql_connect("localhost","root","");

	if (!$con)
	  {
		die('Could not connect: ' . mysql_error());
	  }

mysql_select_db("accidorm_database", $con);

$sql="INSERT INTO resident VALUES ('".$studentnumber."','".$firstname."','".$middlename."','".$lastname."','".$birthday."','".$classification."','".$course."','".$college."')";

if (!mysql_query($sql,$con))
  {
  die('Error: ' . mysql_error());
  }
?>
Resident successfully added.<br/>
<a href="administratorPage.php"><input type="button" value="Back to Main"/></a>
<?php
mysql_close($con)
?>
<div>
</body>
</html>